import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
    state: {
        userData: null,  
    },
    
    actions: {
        setUserData({ commit }, userData) {
            commit('setUserData', userData);
        }
    },
    getters: {
        getUserData(state) {
            return state.userData;
        }
    }
})

export default store